import React from'react';
import './DoctorCard.css';

interface DoctorCardProps {
    name: string;
    title: string;
    hospital: string;
    department: string;
    expertise: string;
    rating: number;
    visits: number;
    price: number;
}

const DoctorCard: React.FC<DoctorCardProps> = ({ name, title, hospital, department, expertise, rating, visits, price }) => {
    return (
        <div className="doctor-card">
            <div className="doctor-info">
                <img src="default-avatar.jpg" alt="医生头像" className="avatar" />
                <div className="details">
                    <h3>{name} {title}</h3>
                    <p>{hospital} {department}</p>
                    <p>擅长: {expertise}</p>
                    <p>好评率 {rating}% | 锦旗 {Math.floor(rating / 33)} | 浏览人次 {visits}</p>
                </div>
            </div>
            <div className="price-info">
                <span className="price">¥{price}起</span>
                <button className="ask-button">问医生</button>
            </div>
        </div>
    );
};

export default DoctorCard;